<?php
_import("HeadCol.php");

class PartController extends BaseController {
	
	// 车型查询
	public function modelSearchAction($params) {
		$headColUtil = new HeadCol();
		$attrTitle = $headColUtil->getAttrHead($params["typeId"]);
		$mobileTitle = explode(":", $headColUtil->getMobileHead());
		$this->assign('mobileTitle', $mobileTitle);
		$this->assign('attrTitle', $attrTitle);
		$this->display("admin/modelSearch.html");
	}
	
	// 编码查找
	public function codeSearchAction($params) {
		$headColUtil = new HeadCol();
		
		$attrTitle = array();
		if( $this->assert($params["typeId"])) {
			$attrTitle = $headColUtil->getAttrHead($params["typeId"]);
		}
		$mobileTitle = explode(":", $headColUtil->getMobileHead());
		
		$this->assign('mobileTitle', $mobileTitle);
		$this->assign('attrTitle', $attrTitle);
		$this->display("admin/codeSearch.html");
	}
}